//
//  AddressView.m
//  560315
//
//  Created by ZERO on 16/1/16.
//  Copyright © 2016年 jishubu0315. All rights reserved.//
//

#import <UIKit/UIKit.h>


typedef NS_ENUM(NSInteger, AddressListType){
    AddressListTwoLine = 0,
    AddressListThreeLine,
};

@protocol AddressDelegate <NSObject>
// 选中的省市区信息
- (void)complete:(UIView *)addressView Str:(NSString *)str;
// 选中的字典
- (void)reback:(UIView *)addressView Pro:(NSString *)pro City:(NSString *)city Area:(NSString *)area;
@optional
- (void)leftAction; // 左侧点击方法
- (void)SelectId:(UIView *)addressView Pro:(NSNumber *)proId City:(NSNumber *)cityId Area:(NSNumber *)areaId;

@end


@interface AddressView : UIView
@property (nonatomic, strong) UIButton     *leftBtn;
@property (nonatomic, strong) UIImageView *icon;
@property (nonatomic, strong) UIView       *shadowView;// 阴影

- (instancetype)initWith:(AddressListType)type;

@property (nonatomic, copy) NSString *province; // 省份
@property (nonatomic, copy) NSString *city;  // 城市
@property (nonatomic, copy) NSString *area;  // 地区

// 上传时候用到
@property (nonatomic, copy) NSString *provinceStr;
@property (nonatomic, copy) NSString *cityStr;
@property (nonatomic, copy) NSString *areaStr;

@property (nonatomic, strong)NSMutableDictionary *selectDic; // 选中之后的信息字典
- (void)cancelPicker;   // 完成
- (void) dismissPicker; // 退出
- (void)showInView;

@property (nonatomic, assign)id <AddressDelegate> delegate;

@property (nonatomic, assign) AddressListType type;


@end
